# 设置基础镜像
FROM python:3.10

# 设置工作目录
WORKDIR /usr/local/forum

# 获得requirements.txt文件
COPY ./requirements.txt .

# 构建镜像时做的事情：下载相关依赖
RUN pip install -r requirements.txt && \
    apt update && \
	apt install -y netcat-traditional

# 首先执行init_flaskenv.sh初始化.flaskenv再启动后端(移动至compose中:wq)
# CMD ["/bin/bash", "-c", "chmod +x ./init_flaskenv.sh && ./init_flaskenv.sh && cat ./init_flaskenv.sh && python app.py"]

